/*
 * @Author: xiaosihan 
 * @Date: 2023-12-07 23:42:13 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2024-10-20 07:39:41
 */


import { autorun } from "mobx";
import { ReactNode, useEffect, useRef, useState } from "react";
import styles from "./designTemplateItem.module.less";
import utils from "@/utils/utils";
import { DesignTemplateDate } from "#/type";

// 设计模版
export default function DesignTemplateItem(props: DesignTemplateDate & { onClick?: () => void }) {

  const dom = useRef<HTMLDivElement | null>(null);
  const [data, setData] = useState({});

  useEffect(() => {

  }, []);

  useEffect(() => autorun(() => {

  }), []);

  return (
    <div className={styles.designTemplateItem} >
      {/* <OnlineIcon disable={props.disable === 0 ? 1 : 0} /> */}
      <img
        className={styles.img}
        src={utils.ossSuffix(props.thumb, 140)}
        alt=""
        onClick={props.onClick}
      />

      <div className={styles.name} >{props.name || "--"}</div>

    </div>
  );

}